<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>B - The Perl Compiler Backend - Perldoc Browser</title>
    <link rel="search" href="https://perldoc.perl.org/opensearch.xml" type="application/opensearchdescription+xml" title="Perldoc Browser">
    <link rel="canonical" href="https://perldoc.perl.org/B">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/stackoverflow-light.min.css" integrity="sha512-cG1IdFxqipi3gqLmksLtuk13C+hBa57a6zpWxMeoY3Q9O6ooFxq50DayCdm0QrDgZjMUn23z/0PMZlgft7Yp5Q==" crossorigin="anonymous" />
    <style>
      body {
        background: #f4f4f5;
        color: #020202;
      }
      .navbar-dark {
        background-image: -webkit-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: -o-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: linear-gradient(to bottom, #005f85 0, #002e49 100%);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff005f85', endColorstr='#ff002e49', GradientType=0);
        background-repeat: repeat-x;
      }
      .navbar-dark .navbar-nav .nav-link,
      .navbar-dark .navbar-nav .nav-link:focus { color: #fff }
      .navbar-dark .navbar-nav .nav-link:hover { color: #ffef68 }
      #wrapperlicious {
        margin: 0 auto;
        font: 0.9em 'Helvetica Neue', Helvetica, sans-serif;
        font-weight: normal;
        line-height: 1.5em;
        margin: 0;
        padding: 0;
      }
      #wrapperlicious h1 { font-size: 1.5em }
      #wrapperlicious h2 { font-size: 1.3em }
      #wrapperlicious h3 { font-size: 1.1em }
      #wrapperlicious h4 { font-size: 0.9em }
      #wrapperlicious h1, #wrapperlicious h2, #wrapperlicious h3,
      #wrapperlicious h4, #wrapperlicious dt {
        color: #020202;
        margin-top: 1em;
        margin-bottom: 1em;
        position: relative;
        font-weight: bold;
      }
      #wrapperlicious a { color: inherit; text-decoration: underline }
      #wrapperlicious #toc { text-decoration: none }
      #wrapperlicious a:hover { color: #2a2a2a }
      #wrapperlicious a img { border: 0 }
      #wrapperlicious :not(pre) > code {
        color: inherit;
        background-color: rgba(0, 0, 0, 0.04);
        border-radius: 3px;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        padding: 0.3em;
      }
      #wrapperlicious dd {
        margin: 0;
        margin-left: 2em;
      }
      #wrapperlicious dt {
        color: #2a2a2a;
        font-weight: bold;
        margin-left: 0.9em;
      }
      #wrapperlicious p {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious li > p {
        margin-bottom: 0;
        margin-top: 0;
      }
      #wrapperlicious pre {
        border: 1px solid #c1c1c1;
        border-radius: 3px;
        font: 100% Consolas, Menlo, Monaco, monospace;
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious pre > code {
        display: block;
        background-color: #f6f6f6;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        line-height: 1.5em;
        text-align: left;
        white-space: pre;
        padding: 1em;
      }
      #wrapperlicious dl, #wrapperlicious ol, #wrapperlicious ul {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious ul {
        list-style-type: square;
      }
      #wrapperlicious ul ul {
        margin-bottom: 0px;
        margin-top: 0px;
      }
      #footer {
        font-size: 0.8em;
        padding-top: 0.5em;
        text-align: center;
      }
      #more {
        display: inline;
        font-size: 0.8em;
      }
      #perldocdiv {
        background-color: #fff;
        border: 1px solid #c1c1c1;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
        margin-left: auto;
        margin-right: auto;
        padding: 3em;
        padding-top: 1em;
        max-width: 960px;
      }
      #moduleversion { float: right }
      #wrapperlicious .leading-notice {
        font-style: italic;
        padding-left: 1em;
        margin-top: 1em;
        margin-bottom: 1em;
      }
      #wrapperlicious .permalink {
        display: none;
        left: -0.75em;
        position: absolute;
        padding-right: 0.25em;
        text-decoration: none;
      }
      #wrapperlicious h1:hover .permalink, #wrapperlicious h2:hover .permalink,
      #wrapperlicious h3:hover .permalink, #wrapperlicious h4:hover .permalink,
      #wrapperlicious dt:hover .permalink {
        display: block;
      }
    </style>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNWBNT5FB"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'G-KVNWBNT5FB');
      gtag('config', 'UA-50555-3');
    </script>
  </head>
  <body>
    <nav class="navbar navbar-expand-md navbar-dark bg-dark justify-content-between">
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <a class="navbar-brand" href="https://perldoc.perl.org/">Perldoc Browser</a>
  <div class="collapse navbar-collapse" id="navbarNav">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="B.html#" id="dropdownlink-stable" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">5.35.0</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-stable">
          <a class="dropdown-item" href="https://perldoc.perl.org/B">Latest</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.2/B">5.38.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.1/B">5.38.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0/B">5.38.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.3/B">5.36.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.2/B">5.36.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.1/B">5.36.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.0/B">5.36.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.3/B">5.34.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.2/B">5.34.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.1/B">5.34.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.0/B">5.34.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.1/B">5.32.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.0/B">5.32.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.3/B">5.30.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.2/B">5.30.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.1/B">5.30.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.0/B">5.30.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.3/B">5.28.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.2/B">5.28.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.1/B">5.28.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.0/B">5.28.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.3/B">5.26.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.2/B">5.26.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.1/B">5.26.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.0/B">5.26.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.4/B">5.24.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.3/B">5.24.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.2/B">5.24.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.1/B">5.24.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.0/B">5.24.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.4/B">5.22.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.3/B">5.22.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.2/B">5.22.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.1/B">5.22.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.0/B">5.22.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.3/B">5.20.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.2/B">5.20.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.1/B">5.20.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.0/B">5.20.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.4/B">5.18.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.3/B">5.18.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.2/B">5.18.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.1/B">5.18.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.0/B">5.18.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.3/B">5.16.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.2/B">5.16.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.1/B">5.16.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.0/B">5.16.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.4/B">5.14.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.3/B">5.14.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.2/B">5.14.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.1/B">5.14.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.0/B">5.14.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.5/B">5.12.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.4/B">5.12.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.3/B">5.12.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.2/B">5.12.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.1/B">5.12.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.0/B">5.12.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.1/B">5.10.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.0/B">5.10.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.9/B">5.8.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.8/B">5.8.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.7/B">5.8.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.6/B">5.8.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.5/B">5.8.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.4/B">5.8.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.3/B">5.8.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.2/B">5.8.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.1/B">5.8.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.0/B">5.8.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.2/B">5.6.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.1/B">5.6.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.0/B">5.6.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_04/B">5.005_04</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_03/B">5.005_03</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_02/B">5.005_02</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_01/B">5.005_01</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005/B">5.005</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="B.html#" id="dropdownlink-dev" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dev</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-dev">
          <a class="dropdown-item" href="https://perldoc.perl.org/blead/B">blead</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.6/B">5.39.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.5/B">5.39.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.4/B">5.39.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.3/B">5.39.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.2/B">5.39.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.1/B">5.39.1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC2/B">5.38.0-RC2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC1/B">5.38.0-RC1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.11/B">5.37.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.10/B">5.37.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.9/B">5.37.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.8/B">5.37.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.7/B">5.37.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.6/B">5.37.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.5/B">5.37.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.4/B">5.37.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.3/B">5.37.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.2/B">5.37.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.1/B">5.37.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.0/B">5.37.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.11/B">5.35.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.10/B">5.35.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.9/B">5.35.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.8/B">5.35.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.7/B">5.35.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.6/B">5.35.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.5/B">5.35.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.4/B">5.35.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.3/B">5.35.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.2/B">5.35.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.1/B">5.35.1</a>
          <a class="dropdown-item active" href="B.html">5.35.0</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="B.html#" id="dropdownlink-nav" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Documentation</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-nav">
          <a class="dropdown-item" href="perl.html">Perl</a>
          <a class="dropdown-item" href="perlintro.html">Intro</a>
          <a class="dropdown-item" href="perl.html#Tutorials">Tutorials</a>
          <a class="dropdown-item" href="perlfaq.html">FAQs</a>
          <a class="dropdown-item" href="perl.html#Reference-Manual">Reference</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlop.html">Operators</a>
          <a class="dropdown-item" href="functions.html">Functions</a>
          <a class="dropdown-item" href="variables.html">Variables</a>
          <a class="dropdown-item" href="modules.html">Modules</a>
          <a class="dropdown-item" href="perlutil.html">Utilities</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlcommunity.html">Community</a>
          <a class="dropdown-item" href="perlhist.html">History</a>
        </div>
      </li>
    </ul>
    <ul class="navbar-nav">
      <script>
        function set_expand (expand) {
          var perldocdiv = document.getElementById('perldocdiv');
          var width = window.getComputedStyle(perldocdiv).getPropertyValue('max-width');
          var expanded = (width == '' || width == 'none') ? true : false;
          if (expand === null) {
            expand = !expanded;
          }
          if ((expand && !expanded) || (!expand && expanded)) {
            perldocdiv.style.setProperty('max-width', expand ? 'none' : '960px');
            var button_classlist = document.getElementById('content-expand-button').classList;
            if (expand) {
              button_classlist.add('btn-light');
              button_classlist.remove('btn-outline-light');
            } else {
              button_classlist.add('btn-outline-light');
              button_classlist.remove('btn-light');
            }
          }
          return expand;
        }
        function toggle_expand () {
          var expand = set_expand(null);
          document.cookie = 'perldoc_expand=' + (expand ? 1 : 0) + '; path=/; expires=Tue, 19 Jan 2038 03:14:07 UTC';
        }
        function read_expand () {
          return document.cookie.split(';').some(function (item) { return item.indexOf('perldoc_expand=1') >= 0 });
        }
        if (document.readyState === 'loading') {
          document.addEventListener('DOMContentLoaded', function () {
            if (read_expand()) {
              set_expand(true);
            }
          });
        } else if (read_expand()) {
          set_expand(true);
        }
      </script>
      <button id="content-expand-button" type="button" class="btn btn-outline-light d-none d-lg-inline-block mr-2" onclick="toggle_expand()">Expand</button>
    <ul>
    <form class="form-inline" method="get" action="https://perldoc.perl.org/5.35.0/search">
      <input class="form-control mr-3" type="search" name="q" placeholder="Search" aria-label="Search">
    </form>
  </div>
</nav>

    <div id="wrapperlicious" class="container-fluid">
      <div id="perldocdiv">
        <div id="links">
          <a href="B.html">B</a>
          <div id="more">
            (<a href="B.txt">source</a>,
            <a href="https://metacpan.org/pod/B">CPAN</a>)
          </div>
            <div id="moduleversion">version 1.82</div>
        </div>
        <div class="leading-notice">
          You are viewing the version of this documentation from Perl 5.35.0.
            This is a development version of Perl.
        </div>
        <h1><a id="toc">CONTENTS</a></h1>
                  <ul>
              <li>
                <a class="text-decoration-none" href="B.html#NAME">NAME</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#SYNOPSIS">SYNOPSIS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#DESCRIPTION">DESCRIPTION</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#OVERVIEW">OVERVIEW</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#Utility-Functions">Utility Functions</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="B.html#Functions-Returning-B::SV,-B::AV,-B::HV,-and-B::CV-objects">Functions Returning B::SV, B::AV, B::HV, and B::CV objects</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#Functions-for-Examining-the-Symbol-Table">Functions for Examining the Symbol Table</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#Functions-Returning-B::OP-objects-or-for-walking-op-trees">Functions Returning B::OP objects or for walking op trees</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#Miscellaneous-Utility-Functions">Miscellaneous Utility Functions</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#Exported-utility-variables">Exported utility variables</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="B.html#OVERVIEW-OF-CLASSES">OVERVIEW OF CLASSES</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="B.html#SV-RELATED-CLASSES">SV-RELATED CLASSES</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::SV-Methods">B::SV Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::IV-Methods">B::IV Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::NV-Methods">B::NV Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::RV-Methods">B::RV Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::PV-Methods">B::PV Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::PVMG-Methods">B::PVMG Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::MAGIC-Methods">B::MAGIC Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::INVLIST-Methods">B::INVLIST Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::PVLV-Methods">B::PVLV Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::BM-Methods">B::BM Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::REGEXP-Methods">B::REGEXP Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::GV-Methods">B::GV Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::IO-Methods">B::IO Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::AV-Methods">B::AV Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::CV-Methods">B::CV Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::HV-Methods">B::HV Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#OP-RELATED-CLASSES">OP-RELATED CLASSES</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::OP-Methods">B::OP Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::UNOP-Method">B::UNOP Method</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::UNOP_AUX-Methods-(since-5.22)">B::UNOP_AUX Methods (since 5.22)</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::BINOP-Method">B::BINOP Method</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::LOGOP-Method">B::LOGOP Method</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::LISTOP-Method">B::LISTOP Method</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::PMOP-Methods">B::PMOP Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::SVOP-Methods">B::SVOP Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::PADOP-Method">B::PADOP Method</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::PVOP-Method">B::PVOP Method</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::LOOP-Methods">B::LOOP Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::COP-Methods">B::COP Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::METHOP-Methods-(Since-Perl-5.22)">B::METHOP Methods (Since Perl 5.22)</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#PAD-RELATED-CLASSES">PAD-RELATED CLASSES</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::PADLIST-Methods">B::PADLIST Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::PADNAMELIST-Methods">B::PADNAMELIST Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#B::PADNAME-Methods">B::PADNAME Methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="B.html#$B::overlay">$B::overlay</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="B.html#AUTHOR">AUTHOR</a>
              </li>
          </ul>

      <h1 id="NAME"><a class="permalink" href="B.html#NAME">#</a>NAME</h1>

<p>B - The Perl Compiler Backend</p>

<h1 id="SYNOPSIS"><a class="permalink" href="B.html#SYNOPSIS">#</a>SYNOPSIS</h1>

<pre><code>use B;</code></pre>

<h1 id="DESCRIPTION"><a class="permalink" href="B.html#DESCRIPTION">#</a>DESCRIPTION</h1>

<p>The <code>B</code> module supplies classes which allow a Perl program to delve into its own innards. It is the module used to implement the &quot;backends&quot; of the Perl compiler. Usage of the compiler does not require knowledge of this module: see the <i>O</i> module for the user-visible part. The <code>B</code> module is of use to those who want to write new compiler backends. This documentation assumes that the reader knows a fair amount about perl&#39;s internals including such things as SVs, OPs and the internal symbol table and syntax tree of a program.</p>

<h1 id="OVERVIEW"><a class="permalink" href="B.html#OVERVIEW">#</a>OVERVIEW</h1>

<p>The <code>B</code> module contains a set of utility functions for querying the current state of the Perl interpreter; typically these functions return objects from the B::SV and B::OP classes, or their derived classes. These classes in turn define methods for querying the resulting objects about their own internal state.</p>

<h1 id="Utility-Functions"><a class="permalink" href="B.html#Utility-Functions">#</a><a id="Utility"></a>Utility Functions</h1>

<p>The <code>B</code> module exports a variety of functions: some are simple utility functions, others provide a Perl program with a way to get an initial &quot;handle&quot; on an internal object.</p>

<h2 id="Functions-Returning-B::SV,-B::AV,-B::HV,-and-B::CV-objects"><a class="permalink" href="B.html#Functions-Returning-B::SV,-B::AV,-B::HV,-and-B::CV-objects">#</a><a id="Functions"></a><a id="Functions-Returning-B::SV-B::AV-B::HV-and-B::CV-objects"></a>Functions Returning <code>B::SV</code>, <code>B::AV</code>, <code>B::HV</code>, and <code>B::CV</code> objects</h2>

<p>For descriptions of the class hierarchy of these objects and the methods that can be called on them, see below, <a href="B.html#OVERVIEW-OF-CLASSES">&quot;OVERVIEW OF CLASSES&quot;</a> and <a href="B.html#SV-RELATED-CLASSES">&quot;SV-RELATED CLASSES&quot;</a>.</p>

<dl>

<dt id="sv_undef"><a class="permalink" href="B.html#sv_undef">#</a>sv_undef</dt>
<dd>

<p>Returns the SV object corresponding to the C variable <code>sv_undef</code>.</p>

</dd>
<dt id="sv_yes"><a class="permalink" href="B.html#sv_yes">#</a>sv_yes</dt>
<dd>

<p>Returns the SV object corresponding to the C variable <code>sv_yes</code>.</p>

</dd>
<dt id="sv_no"><a class="permalink" href="B.html#sv_no">#</a>sv_no</dt>
<dd>

<p>Returns the SV object corresponding to the C variable <code>sv_no</code>.</p>

</dd>
<dt id="svref_2object(SVREF)"><a class="permalink" href="B.html#svref_2object(SVREF)">#</a><a id="svref_2object"></a><a id="svref_2object-SVREF"></a>svref_2object(SVREF)</dt>
<dd>

<p>Takes a reference to any Perl value, and turns the referred-to value into an object in the appropriate B::OP-derived or B::SV-derived class. Apart from functions such as <code>main_root</code>, this is the primary way to get an initial &quot;handle&quot; on an internal perl data structure which can then be followed with the other access methods.</p>

<p>The returned object will only be valid as long as the underlying OPs and SVs continue to exist. Do not attempt to use the object after the underlying structures are freed.</p>

</dd>
<dt id="amagic_generation"><a class="permalink" href="B.html#amagic_generation">#</a>amagic_generation</dt>
<dd>

<p>Returns the SV object corresponding to the C variable <code>amagic_generation</code>. As of Perl 5.18, this is just an alias to <code>PL_na</code>, so its value is meaningless.</p>

</dd>
<dt id="init_av"><a class="permalink" href="B.html#init_av">#</a>init_av</dt>
<dd>

<p>Returns the AV object (i.e. in class B::AV) representing INIT blocks.</p>

</dd>
<dt id="check_av"><a class="permalink" href="B.html#check_av">#</a>check_av</dt>
<dd>

<p>Returns the AV object (i.e. in class B::AV) representing CHECK blocks.</p>

</dd>
<dt id="unitcheck_av"><a class="permalink" href="B.html#unitcheck_av">#</a>unitcheck_av</dt>
<dd>

<p>Returns the AV object (i.e. in class B::AV) representing UNITCHECK blocks.</p>

</dd>
<dt id="begin_av"><a class="permalink" href="B.html#begin_av">#</a>begin_av</dt>
<dd>

<p>Returns the AV object (i.e. in class B::AV) representing BEGIN blocks.</p>

</dd>
<dt id="end_av"><a class="permalink" href="B.html#end_av">#</a>end_av</dt>
<dd>

<p>Returns the AV object (i.e. in class B::AV) representing END blocks.</p>

</dd>
<dt id="comppadlist"><a class="permalink" href="B.html#comppadlist">#</a>comppadlist</dt>
<dd>

<p>Returns the PADLIST object (i.e. in class B::PADLIST) of the global comppadlist. In Perl 5.16 and earlier it returns an AV object (class B::AV).</p>

</dd>
<dt id="regex_padav"><a class="permalink" href="B.html#regex_padav">#</a>regex_padav</dt>
<dd>

<p>Only when perl was compiled with ithreads.</p>

</dd>
<dt id="main_cv"><a class="permalink" href="B.html#main_cv">#</a>main_cv</dt>
<dd>

<p>Return the (faked) CV corresponding to the main part of the Perl program.</p>

</dd>
</dl>

<h2 id="Functions-for-Examining-the-Symbol-Table"><a class="permalink" href="B.html#Functions-for-Examining-the-Symbol-Table">#</a><a id="Functions1"></a>Functions for Examining the Symbol Table</h2>

<dl>

<dt id="walksymtable(SYMREF,-METHOD,-RECURSE,-PREFIX)"><a class="permalink" href="B.html#walksymtable(SYMREF,-METHOD,-RECURSE,-PREFIX)">#</a><a id="walksymtable"></a><a id="walksymtable-SYMREF-METHOD-RECURSE-PREFIX"></a>walksymtable(SYMREF, METHOD, RECURSE, PREFIX)</dt>
<dd>

<p>Walk the symbol table starting at SYMREF and call METHOD on each symbol (a B::GV object) visited. When the walk reaches package symbols (such as &quot;Foo::&quot;) it invokes RECURSE, passing in the symbol name, and only recurses into the package if that sub returns true.</p>

<p>PREFIX is the name of the SYMREF you&#39;re walking.</p>

<p>For example:</p>

<pre><code># Walk CGI&#39;s symbol table calling print_subs on each symbol.
# Recurse only into CGI::Util::
walksymtable(\%CGI::, &#39;print_subs&#39;,
             sub { $_[0] eq &#39;CGI::Util::&#39; }, &#39;CGI::&#39;);</code></pre>

<p>print_subs() is a B::GV method you have declared. Also see <a href="B.html#B%3A%3AGV-Methods">&quot;B::GV Methods&quot;</a>, below.</p>

</dd>
</dl>

<h2 id="Functions-Returning-B::OP-objects-or-for-walking-op-trees"><a class="permalink" href="B.html#Functions-Returning-B::OP-objects-or-for-walking-op-trees">#</a><a id="Functions2"></a>Functions Returning <code>B::OP</code> objects or for walking op trees</h2>

<p>For descriptions of the class hierarchy of these objects and the methods that can be called on them, see below, <a href="B.html#OVERVIEW-OF-CLASSES">&quot;OVERVIEW OF CLASSES&quot;</a> and <a href="B.html#OP-RELATED-CLASSES">&quot;OP-RELATED CLASSES&quot;</a>.</p>

<dl>

<dt id="main_root"><a class="permalink" href="B.html#main_root">#</a>main_root</dt>
<dd>

<p>Returns the root op (i.e. an object in the appropriate B::OP-derived class) of the main part of the Perl program.</p>

</dd>
<dt id="main_start"><a class="permalink" href="B.html#main_start">#</a>main_start</dt>
<dd>

<p>Returns the starting op of the main part of the Perl program.</p>

</dd>
<dt id="walkoptree(OP,-METHOD)"><a class="permalink" href="B.html#walkoptree(OP,-METHOD)">#</a><a id="walkoptree"></a><a id="walkoptree-OP-METHOD"></a>walkoptree(OP, METHOD)</dt>
<dd>

<p>Does a tree-walk of the syntax tree based at OP and calls METHOD on each op it visits. Each node is visited before its children. If <code>walkoptree_debug</code> (see below) has been called to turn debugging on then the method <code>walkoptree_debug</code> is called on each op before METHOD is called.</p>

</dd>
<dt id="walkoptree_debug(DEBUG)"><a class="permalink" href="B.html#walkoptree_debug(DEBUG)">#</a><a id="walkoptree_debug"></a><a id="walkoptree_debug-DEBUG"></a>walkoptree_debug(DEBUG)</dt>
<dd>

<p>Returns the current debugging flag for <code>walkoptree</code>. If the optional DEBUG argument is non-zero, it sets the debugging flag to that. See the description of <code>walkoptree</code> above for what the debugging flag does.</p>

</dd>
</dl>

<h2 id="Miscellaneous-Utility-Functions"><a class="permalink" href="B.html#Miscellaneous-Utility-Functions">#</a><a id="Miscellaneous"></a>Miscellaneous Utility Functions</h2>

<dl>

<dt id="ppname(OPNUM)"><a class="permalink" href="B.html#ppname(OPNUM)">#</a><a id="ppname"></a><a id="ppname-OPNUM"></a>ppname(OPNUM)</dt>
<dd>

<p>Return the PP function name (e.g. &quot;pp_add&quot;) of op number OPNUM.</p>

</dd>
<dt id="hash(STR)"><a class="permalink" href="B.html#hash(STR)">#</a><a id="hash"></a><a id="hash-STR"></a>hash(STR)</dt>
<dd>

<p>Returns a string in the form &quot;0x...&quot; representing the value of the internal hash function used by perl on string STR.</p>

</dd>
<dt id="cast_I32(I)"><a class="permalink" href="B.html#cast_I32(I)">#</a><a id="cast_I32"></a><a id="cast_I32-I"></a>cast_I32(I)</dt>
<dd>

<p>Casts I to the internal I32 type used by that perl.</p>

</dd>
<dt id="minus_c"><a class="permalink" href="B.html#minus_c">#</a>minus_c</dt>
<dd>

<p>Does the equivalent of the <code>-c</code> command-line option. Obviously, this is only useful in a BEGIN block or else the flag is set too late.</p>

</dd>
<dt id="cstring(STR)"><a class="permalink" href="B.html#cstring(STR)">#</a><a id="cstring"></a><a id="cstring-STR"></a>cstring(STR)</dt>
<dd>

<p>Returns a double-quote-surrounded escaped version of STR which can be used as a string in C source code.</p>

</dd>
<dt id="perlstring(STR)"><a class="permalink" href="B.html#perlstring(STR)">#</a><a id="perlstring"></a><a id="perlstring-STR"></a>perlstring(STR)</dt>
<dd>

<p>Returns a double-quote-surrounded escaped version of STR which can be used as a string in Perl source code.</p>

</dd>
<dt id="safename(STR)"><a class="permalink" href="B.html#safename(STR)">#</a><a id="safename"></a><a id="safename-STR"></a>safename(STR)</dt>
<dd>

<p>This function returns the string with the first character modified if it is a control character. It converts it to ^X format first, so that &quot;\cG&quot; becomes &quot;^G&quot;. This is used internally by <a href="B.html#SAFENAME">B::GV::SAFENAME</a>, but you can call it directly.</p>

</dd>
<dt id="class(OBJ)"><a class="permalink" href="B.html#class(OBJ)">#</a><a id="class"></a><a id="class-OBJ"></a>class(OBJ)</dt>
<dd>

<p>Returns the class of an object without the part of the classname preceding the first <code>&quot;::&quot;</code>. This is used to turn <code>&quot;B::UNOP&quot;</code> into <code>&quot;UNOP&quot;</code> for example.</p>

</dd>
<dt id="threadsv_names"><a class="permalink" href="B.html#threadsv_names">#</a>threadsv_names</dt>
<dd>

<p>This used to provide support for the old 5.005 threading module. It now does nothing.</p>

</dd>
</dl>

<h2 id="Exported-utility-variables"><a class="permalink" href="B.html#Exported-utility-variables">#</a><a id="Exported"></a>Exported utility variables</h2>

<dl>

<dt id="@optype"><a class="permalink" href="B.html#@optype">#</a><a id="optype"></a>@optype</dt>
<dd>

<pre><code>my $op_type = $optype[$op_type_num];</code></pre>

<p>A simple mapping of the op type number to its type (like &#39;COP&#39; or &#39;BINOP&#39;).</p>

</dd>
<dt id="@specialsv_name"><a class="permalink" href="B.html#@specialsv_name">#</a><a id="specialsv_name"></a>@specialsv_name</dt>
<dd>

<pre><code>my $sv_name = $specialsv_name[$sv_index];</code></pre>

<p>Certain SV types are considered &#39;special&#39;. They&#39;re represented by B::SPECIAL and are referred to by a number from the specialsv_list. This array maps that number back to the name of the SV (like &#39;Nullsv&#39; or &#39;&amp;PL_sv_undef&#39;).</p>

</dd>
</dl>

<h1 id="OVERVIEW-OF-CLASSES"><a class="permalink" href="B.html#OVERVIEW-OF-CLASSES">#</a><a id="OVERVIEW1"></a>OVERVIEW OF CLASSES</h1>

<p>The C structures used by Perl&#39;s internals to hold SV and OP information (PVIV, AV, HV, ..., OP, SVOP, UNOP, ...) are modelled on a class hierarchy and the <code>B</code> module gives access to them via a true object hierarchy. Structure fields which point to other objects (whether types of SV or types of OP) are represented by the <code>B</code> module as Perl objects of the appropriate class.</p>

<p>The bulk of the <code>B</code> module is the methods for accessing fields of these structures.</p>

<p>Note that all access is read-only. You cannot modify the internals by using this module. Also, note that the B::OP and B::SV objects created by this module are only valid for as long as the underlying objects exist; their creation doesn&#39;t increase the reference counts of the underlying objects. Trying to access the fields of a freed object will give incomprehensible results, or worse.</p>

<h2 id="SV-RELATED-CLASSES"><a class="permalink" href="B.html#SV-RELATED-CLASSES">#</a><a id="SV1"></a>SV-RELATED CLASSES</h2>

<p>B::IV, B::NV, B::PV, B::PVIV, B::PVNV, B::PVMG, B::PVLV, B::AV, B::HV, B::CV, B::GV, B::FM, B::IO. These classes correspond in the obvious way to the underlying C structures of similar names. The inheritance hierarchy mimics the underlying C &quot;inheritance&quot;:</p>

<pre><code class="plaintext">                   B::SV
                     |
        +------------+------------+
        |            |            |
      B::PV        B::IV        B::NV
       /  \         /           /
      /    \       /           /
B::INVLIST  B::PVIV           /
                 \           /
                  \         /
                   \       /
                    B::PVNV
                       |
                       |
                    B::PVMG
                       |
   +-------+-------+---+---+-------+-------+
   |       |       |       |       |       |
 B::AV   B::GV   B::HV   B::CV   B::IO B::REGEXP
           |               |
           |               |
        B::PVLV          B::FM</code></pre>

<p>Access methods correspond to the underlying C macros for field access, usually with the leading &quot;class indication&quot; prefix removed (Sv, Av, Hv, ...). The leading prefix is only left in cases where its removal would cause a clash in method name. For example, <code>GvREFCNT</code> stays as-is since its abbreviation would clash with the &quot;superclass&quot; method <code>REFCNT</code> (corresponding to the C function <code>SvREFCNT</code>).</p>

<h2 id="B::SV-Methods"><a class="permalink" href="B.html#B::SV-Methods">#</a><a id="B"></a>B::SV Methods</h2>

<dl>

<dt id="REFCNT"><a class="permalink" href="B.html#REFCNT">#</a>REFCNT</dt>
<dd>

</dd>
<dt id="FLAGS"><a class="permalink" href="B.html#FLAGS">#</a>FLAGS</dt>
<dd>

</dd>
<dt id="object_2svref"><a class="permalink" href="B.html#object_2svref">#</a>object_2svref</dt>
<dd>

<p>Returns a reference to the regular scalar corresponding to this B::SV object. In other words, this method is the inverse operation to the svref_2object() subroutine. This scalar and other data it points at should be considered read-only: modifying them is neither safe nor guaranteed to have a sensible effect.</p>

</dd>
</dl>

<h2 id="B::IV-Methods"><a class="permalink" href="B.html#B::IV-Methods">#</a><a id="B1"></a>B::IV Methods</h2>

<dl>

<dt id="IV"><a class="permalink" href="B.html#IV">#</a>IV</dt>
<dd>

<p>Returns the value of the IV, <i>interpreted as a signed integer</i>. This will be misleading if <code>FLAGS &amp; SVf_IVisUV</code>. Perhaps you want the <code>int_value</code> method instead?</p>

</dd>
<dt id="IVX"><a class="permalink" href="B.html#IVX">#</a>IVX</dt>
<dd>

</dd>
<dt id="UVX"><a class="permalink" href="B.html#UVX">#</a>UVX</dt>
<dd>

</dd>
<dt id="int_value"><a class="permalink" href="B.html#int_value">#</a>int_value</dt>
<dd>

<p>This method returns the value of the IV as an integer. It differs from <code>IV</code> in that it returns the correct value regardless of whether it&#39;s stored signed or unsigned.</p>

</dd>
<dt id="needs64bits"><a class="permalink" href="B.html#needs64bits">#</a>needs64bits</dt>
<dd>

</dd>
<dt id="packiv"><a class="permalink" href="B.html#packiv">#</a>packiv</dt>
<dd>

</dd>
</dl>

<h2 id="B::NV-Methods"><a class="permalink" href="B.html#B::NV-Methods">#</a><a id="B2"></a>B::NV Methods</h2>

<dl>

<dt id="NV"><a class="permalink" href="B.html#NV">#</a>NV</dt>
<dd>

</dd>
<dt id="NVX"><a class="permalink" href="B.html#NVX">#</a>NVX</dt>
<dd>

</dd>
<dt id="COP_SEQ_RANGE_LOW"><a class="permalink" href="B.html#COP_SEQ_RANGE_LOW">#</a>COP_SEQ_RANGE_LOW</dt>
<dd>

</dd>
<dt id="COP_SEQ_RANGE_HIGH"><a class="permalink" href="B.html#COP_SEQ_RANGE_HIGH">#</a>COP_SEQ_RANGE_HIGH</dt>
<dd>

<p>These last two are only valid for pad name SVs. They only existed in the B::NV class before Perl 5.22. In 5.22 they were moved to the B::PADNAME class.</p>

</dd>
</dl>

<h2 id="B::RV-Methods"><a class="permalink" href="B.html#B::RV-Methods">#</a><a id="B3"></a>B::RV Methods</h2>

<dl>

<dt id="RV"><a class="permalink" href="B.html#RV">#</a>RV</dt>
<dd>

</dd>
</dl>

<h2 id="B::PV-Methods"><a class="permalink" href="B.html#B::PV-Methods">#</a><a id="B4"></a>B::PV Methods</h2>

<dl>

<dt id="PV"><a class="permalink" href="B.html#PV">#</a>PV</dt>
<dd>

<p>This method is the one you usually want. It constructs a string using the length and offset information in the struct: for ordinary scalars it will return the string that you&#39;d see from Perl, even if it contains null characters.</p>

</dd>
<dt id="RV1"><a class="permalink" href="B.html#RV1">#</a>RV</dt>
<dd>

<p>Same as B::RV::RV, except that it will die() if the PV isn&#39;t a reference.</p>

</dd>
<dt id="PVX"><a class="permalink" href="B.html#PVX">#</a>PVX</dt>
<dd>

<p>This method is less often useful. It assumes that the string stored in the struct is null-terminated, and disregards the length information.</p>

<p>It is the appropriate method to use if you need to get the name of a lexical variable from a padname array. Lexical variable names are always stored with a null terminator, and the length field (CUR) is overloaded for other purposes and can&#39;t be relied on here.</p>

</dd>
<dt id="CUR"><a class="permalink" href="B.html#CUR">#</a>CUR</dt>
<dd>

<p>This method returns the internal length field, which consists of the number of internal bytes, not necessarily the number of logical characters.</p>

</dd>
<dt id="LEN"><a class="permalink" href="B.html#LEN">#</a>LEN</dt>
<dd>

<p>This method returns the number of bytes allocated (via malloc) for storing the string. This is 0 if the scalar does not &quot;own&quot; the string.</p>

</dd>
</dl>

<h2 id="B::PVMG-Methods"><a class="permalink" href="B.html#B::PVMG-Methods">#</a><a id="B5"></a>B::PVMG Methods</h2>

<dl>

<dt id="MAGIC"><a class="permalink" href="B.html#MAGIC">#</a>MAGIC</dt>
<dd>

</dd>
<dt id="SvSTASH"><a class="permalink" href="B.html#SvSTASH">#</a>SvSTASH</dt>
<dd>

</dd>
</dl>

<h2 id="B::MAGIC-Methods"><a class="permalink" href="B.html#B::MAGIC-Methods">#</a><a id="B6"></a>B::MAGIC Methods</h2>

<dl>

<dt id="MOREMAGIC"><a class="permalink" href="B.html#MOREMAGIC">#</a>MOREMAGIC</dt>
<dd>

</dd>
<dt id="precomp"><a class="permalink" href="B.html#precomp">#</a>precomp</dt>
<dd>

<p>Only valid on r-magic, returns the string that generated the regexp.</p>

</dd>
<dt id="PRIVATE"><a class="permalink" href="B.html#PRIVATE">#</a>PRIVATE</dt>
<dd>

</dd>
<dt id="TYPE"><a class="permalink" href="B.html#TYPE">#</a>TYPE</dt>
<dd>

</dd>
<dt id="FLAGS1"><a class="permalink" href="B.html#FLAGS1">#</a>FLAGS</dt>
<dd>

</dd>
<dt id="OBJ"><a class="permalink" href="B.html#OBJ">#</a>OBJ</dt>
<dd>

<p>Will die() if called on r-magic.</p>

</dd>
<dt id="PTR"><a class="permalink" href="B.html#PTR">#</a>PTR</dt>
<dd>

</dd>
<dt id="REGEX"><a class="permalink" href="B.html#REGEX">#</a>REGEX</dt>
<dd>

<p>Only valid on r-magic, returns the integer value of the REGEX stored in the MAGIC.</p>

</dd>
</dl>

<h2 id="B::INVLIST-Methods"><a class="permalink" href="B.html#B::INVLIST-Methods">#</a><a id="B7"></a>B::INVLIST Methods</h2>

<dl>

<dt id="prev_index"><a class="permalink" href="B.html#prev_index">#</a>prev_index</dt>
<dd>

<p>Returns the cache result of previous invlist_search() (internal usage)</p>

</dd>
<dt id="is_offset"><a class="permalink" href="B.html#is_offset">#</a>is_offset</dt>
<dd>

<p>Returns a boolean value (0 or 1) to know if the invlist is using an offset. When false the list begins with the code point U+0000. When true the list begins with the following elements.</p>

</dd>
<dt id="array_len"><a class="permalink" href="B.html#array_len">#</a>array_len</dt>
<dd>

<p>Returns an integer with the size of the array used to define the invlist.</p>

</dd>
<dt id="get_invlist_array"><a class="permalink" href="B.html#get_invlist_array">#</a>get_invlist_array</dt>
<dd>

<p>This method returns a list of integers representing the array used by the invlist. Note: this cannot be used while in middle of iterating on an invlist and croaks.</p>

</dd>
</dl>

<h2 id="B::PVLV-Methods"><a class="permalink" href="B.html#B::PVLV-Methods">#</a><a id="B8"></a>B::PVLV Methods</h2>

<dl>

<dt id="TARGOFF"><a class="permalink" href="B.html#TARGOFF">#</a>TARGOFF</dt>
<dd>

</dd>
<dt id="TARGLEN"><a class="permalink" href="B.html#TARGLEN">#</a>TARGLEN</dt>
<dd>

</dd>
<dt id="TYPE1"><a class="permalink" href="B.html#TYPE1">#</a>TYPE</dt>
<dd>

</dd>
<dt id="TARG"><a class="permalink" href="B.html#TARG">#</a>TARG</dt>
<dd>

</dd>
</dl>

<h2 id="B::BM-Methods"><a class="permalink" href="B.html#B::BM-Methods">#</a><a id="B9"></a>B::BM Methods</h2>

<dl>

<dt id="USEFUL"><a class="permalink" href="B.html#USEFUL">#</a>USEFUL</dt>
<dd>

</dd>
<dt id="PREVIOUS"><a class="permalink" href="B.html#PREVIOUS">#</a>PREVIOUS</dt>
<dd>

</dd>
<dt id="RARE"><a class="permalink" href="B.html#RARE">#</a>RARE</dt>
<dd>

</dd>
<dt id="TABLE"><a class="permalink" href="B.html#TABLE">#</a>TABLE</dt>
<dd>

</dd>
</dl>

<h2 id="B::REGEXP-Methods"><a class="permalink" href="B.html#B::REGEXP-Methods">#</a><a id="B10"></a>B::REGEXP Methods</h2>

<dl>

<dt id="REGEX1"><a class="permalink" href="B.html#REGEX1">#</a>REGEX</dt>
<dd>

</dd>
<dt id="precomp1"><a class="permalink" href="B.html#precomp1">#</a>precomp</dt>
<dd>

</dd>
<dt id="qr_anoncv"><a class="permalink" href="B.html#qr_anoncv">#</a>qr_anoncv</dt>
<dd>

</dd>
<dt id="compflags"><a class="permalink" href="B.html#compflags">#</a>compflags</dt>
<dd>

<p>The last two were added in Perl 5.22.</p>

</dd>
</dl>

<h2 id="B::GV-Methods"><a class="permalink" href="B.html#B::GV-Methods">#</a><a id="B11"></a>B::GV Methods</h2>

<dl>

<dt id="is_empty"><a class="permalink" href="B.html#is_empty">#</a>is_empty</dt>
<dd>

<p>This method returns TRUE if the GP field of the GV is NULL.</p>

</dd>
<dt id="NAME1"><a class="permalink" href="B.html#NAME1">#</a>NAME</dt>
<dd>

</dd>
<dt id="SAFENAME"><a class="permalink" href="B.html#SAFENAME">#</a>SAFENAME</dt>
<dd>

<p>This method returns the name of the glob, but if the first character of the name is a control character, then it converts it to ^X first, so that *^G would return &quot;^G&quot; rather than &quot;\cG&quot;.</p>

<p>It&#39;s useful if you want to print out the name of a variable. If you restrict yourself to globs which exist at compile-time then the result ought to be unambiguous, because code like <code>${&quot;^G&quot;} = 1</code> is compiled as two ops - a constant string and a dereference (rv2gv) - so that the glob is created at runtime.</p>

<p>If you&#39;re working with globs at runtime, and need to disambiguate *^G from *{&quot;^G&quot;}, then you should use the raw NAME method.</p>

</dd>
<dt id="STASH"><a class="permalink" href="B.html#STASH">#</a>STASH</dt>
<dd>

</dd>
<dt id="SV"><a class="permalink" href="B.html#SV">#</a>SV</dt>
<dd>

</dd>
<dt id="IO"><a class="permalink" href="B.html#IO">#</a>IO</dt>
<dd>

</dd>
<dt id="FORM"><a class="permalink" href="B.html#FORM">#</a>FORM</dt>
<dd>

</dd>
<dt id="AV"><a class="permalink" href="B.html#AV">#</a>AV</dt>
<dd>

</dd>
<dt id="HV"><a class="permalink" href="B.html#HV">#</a>HV</dt>
<dd>

</dd>
<dt id="EGV"><a class="permalink" href="B.html#EGV">#</a>EGV</dt>
<dd>

</dd>
<dt id="CV"><a class="permalink" href="B.html#CV">#</a>CV</dt>
<dd>

</dd>
<dt id="CVGEN"><a class="permalink" href="B.html#CVGEN">#</a>CVGEN</dt>
<dd>

</dd>
<dt id="LINE"><a class="permalink" href="B.html#LINE">#</a>LINE</dt>
<dd>

</dd>
<dt id="FILE"><a class="permalink" href="B.html#FILE">#</a>FILE</dt>
<dd>

</dd>
<dt id="FILEGV"><a class="permalink" href="B.html#FILEGV">#</a>FILEGV</dt>
<dd>

</dd>
<dt id="GvREFCNT"><a class="permalink" href="B.html#GvREFCNT">#</a>GvREFCNT</dt>
<dd>

</dd>
<dt id="FLAGS2"><a class="permalink" href="B.html#FLAGS2">#</a>FLAGS</dt>
<dd>

</dd>
<dt id="GPFLAGS"><a class="permalink" href="B.html#GPFLAGS">#</a>GPFLAGS</dt>
<dd>

<p>This last one is present only in perl 5.22.0 and higher.</p>

</dd>
</dl>

<h2 id="B::IO-Methods"><a class="permalink" href="B.html#B::IO-Methods">#</a><a id="B12"></a>B::IO Methods</h2>

<p>B::IO objects derive from IO objects and you will get more information from the IO object itself.</p>

<p>For example:</p>

<pre><code>$gvio = B::svref_2object(\*main::stdin)-&gt;IO;
$IO = $gvio-&gt;object_2svref();
$fd = $IO-&gt;fileno();</code></pre>

<dl>

<dt id="LINES"><a class="permalink" href="B.html#LINES">#</a>LINES</dt>
<dd>

</dd>
<dt id="PAGE"><a class="permalink" href="B.html#PAGE">#</a>PAGE</dt>
<dd>

</dd>
<dt id="PAGE_LEN"><a class="permalink" href="B.html#PAGE_LEN">#</a>PAGE_LEN</dt>
<dd>

</dd>
<dt id="LINES_LEFT"><a class="permalink" href="B.html#LINES_LEFT">#</a>LINES_LEFT</dt>
<dd>

</dd>
<dt id="TOP_NAME"><a class="permalink" href="B.html#TOP_NAME">#</a>TOP_NAME</dt>
<dd>

</dd>
<dt id="TOP_GV"><a class="permalink" href="B.html#TOP_GV">#</a>TOP_GV</dt>
<dd>

</dd>
<dt id="FMT_NAME"><a class="permalink" href="B.html#FMT_NAME">#</a>FMT_NAME</dt>
<dd>

</dd>
<dt id="FMT_GV"><a class="permalink" href="B.html#FMT_GV">#</a>FMT_GV</dt>
<dd>

</dd>
<dt id="BOTTOM_NAME"><a class="permalink" href="B.html#BOTTOM_NAME">#</a>BOTTOM_NAME</dt>
<dd>

</dd>
<dt id="BOTTOM_GV"><a class="permalink" href="B.html#BOTTOM_GV">#</a>BOTTOM_GV</dt>
<dd>

</dd>
<dt id="SUBPROCESS"><a class="permalink" href="B.html#SUBPROCESS">#</a>SUBPROCESS</dt>
<dd>

</dd>
<dt id="IoTYPE"><a class="permalink" href="B.html#IoTYPE">#</a>IoTYPE</dt>
<dd>

<p>A character symbolizing the type of IO Handle.</p>

<pre><code class="plaintext">-     STDIN/OUT
I     STDIN/OUT/ERR
&lt;     read-only
&gt;     write-only
a     append
+     read and write
s     socket
|     pipe
I     IMPLICIT
#     NUMERIC
space closed handle
\0    closed internal handle</code></pre>

</dd>
<dt id="IoFLAGS"><a class="permalink" href="B.html#IoFLAGS">#</a>IoFLAGS</dt>
<dd>

</dd>
<dt id="IsSTD"><a class="permalink" href="B.html#IsSTD">#</a>IsSTD</dt>
<dd>

<p>Takes one argument ( &#39;stdin&#39; | &#39;stdout&#39; | &#39;stderr&#39; ) and returns true if the IoIFP of the object is equal to the handle whose name was passed as argument; i.e., $io-&gt;IsSTD(&#39;stderr&#39;) is true if IoIFP($io) == PerlIO_stderr().</p>

</dd>
</dl>

<h2 id="B::AV-Methods"><a class="permalink" href="B.html#B::AV-Methods">#</a><a id="B13"></a>B::AV Methods</h2>

<dl>

<dt id="FILL"><a class="permalink" href="B.html#FILL">#</a>FILL</dt>
<dd>

</dd>
<dt id="MAX"><a class="permalink" href="B.html#MAX">#</a>MAX</dt>
<dd>

</dd>
<dt id="ARRAY"><a class="permalink" href="B.html#ARRAY">#</a>ARRAY</dt>
<dd>

</dd>
<dt id="ARRAYelt"><a class="permalink" href="B.html#ARRAYelt">#</a>ARRAYelt</dt>
<dd>

<p>Like <code>ARRAY</code>, but takes an index as an argument to get only one element, rather than a list of all of them.</p>

</dd>
</dl>

<h2 id="B::CV-Methods"><a class="permalink" href="B.html#B::CV-Methods">#</a><a id="B14"></a>B::CV Methods</h2>

<dl>

<dt id="STASH1"><a class="permalink" href="B.html#STASH1">#</a>STASH</dt>
<dd>

</dd>
<dt id="START"><a class="permalink" href="B.html#START">#</a>START</dt>
<dd>

</dd>
<dt id="ROOT"><a class="permalink" href="B.html#ROOT">#</a>ROOT</dt>
<dd>

</dd>
<dt id="GV"><a class="permalink" href="B.html#GV">#</a>GV</dt>
<dd>

</dd>
<dt id="FILE1"><a class="permalink" href="B.html#FILE1">#</a>FILE</dt>
<dd>

</dd>
<dt id="DEPTH"><a class="permalink" href="B.html#DEPTH">#</a>DEPTH</dt>
<dd>

</dd>
<dt id="PADLIST"><a class="permalink" href="B.html#PADLIST">#</a>PADLIST</dt>
<dd>

<p>Returns a B::PADLIST object.</p>

</dd>
<dt id="OUTSIDE"><a class="permalink" href="B.html#OUTSIDE">#</a>OUTSIDE</dt>
<dd>

</dd>
<dt id="OUTSIDE_SEQ"><a class="permalink" href="B.html#OUTSIDE_SEQ">#</a>OUTSIDE_SEQ</dt>
<dd>

</dd>
<dt id="XSUB"><a class="permalink" href="B.html#XSUB">#</a>XSUB</dt>
<dd>

</dd>
<dt id="XSUBANY"><a class="permalink" href="B.html#XSUBANY">#</a>XSUBANY</dt>
<dd>

<p>For constant subroutines, returns the constant SV returned by the subroutine.</p>

</dd>
<dt id="CvFLAGS"><a class="permalink" href="B.html#CvFLAGS">#</a>CvFLAGS</dt>
<dd>

</dd>
<dt id="const_sv"><a class="permalink" href="B.html#const_sv">#</a>const_sv</dt>
<dd>

</dd>
<dt id="NAME_HEK"><a class="permalink" href="B.html#NAME_HEK">#</a>NAME_HEK</dt>
<dd>

<p>Returns the name of a lexical sub, otherwise <code>undef</code>.</p>

</dd>
</dl>

<h2 id="B::HV-Methods"><a class="permalink" href="B.html#B::HV-Methods">#</a><a id="B15"></a>B::HV Methods</h2>

<dl>

<dt id="FILL1"><a class="permalink" href="B.html#FILL1">#</a>FILL</dt>
<dd>

</dd>
<dt id="MAX1"><a class="permalink" href="B.html#MAX1">#</a>MAX</dt>
<dd>

</dd>
<dt id="KEYS"><a class="permalink" href="B.html#KEYS">#</a>KEYS</dt>
<dd>

</dd>
<dt id="RITER"><a class="permalink" href="B.html#RITER">#</a>RITER</dt>
<dd>

</dd>
<dt id="NAME2"><a class="permalink" href="B.html#NAME2">#</a>NAME</dt>
<dd>

</dd>
<dt id="ARRAY1"><a class="permalink" href="B.html#ARRAY1">#</a>ARRAY</dt>
<dd>

</dd>
</dl>

<h2 id="OP-RELATED-CLASSES"><a class="permalink" href="B.html#OP-RELATED-CLASSES">#</a><a id="OP"></a>OP-RELATED CLASSES</h2>

<p><code>B::OP</code>, <code>B::UNOP</code>, <code>B::UNOP_AUX</code>, <code>B::BINOP</code>, <code>B::LOGOP</code>, <code>B::LISTOP</code>, <code>B::PMOP</code>, <code>B::SVOP</code>, <code>B::PADOP</code>, <code>B::PVOP</code>, <code>B::LOOP</code>, <code>B::COP</code>, <code>B::METHOP</code>.</p>

<p>These classes correspond in the obvious way to the underlying C structures of similar names. The inheritance hierarchy mimics the underlying C &quot;inheritance&quot;:</p>

<pre><code class="plaintext">                         B::OP
                           |
           +----------+---------+--------+-------+---------+
           |          |         |        |       |         |
        B::UNOP    B::SVOP  B::PADOP  B::COP  B::PVOP  B::METHOP
           |
       +---+---+---------+
       |       |         |
   B::BINOP  B::LOGOP  B::UNOP_AUX
       |
       |
   B::LISTOP
       |
   +---+---+
   |       |
B::LOOP   B::PMOP</code></pre>

<p>Access methods correspond to the underlying C structure field names, with the leading &quot;class indication&quot; prefix (<code>&quot;op_&quot;</code>) removed.</p>

<h2 id="B::OP-Methods"><a class="permalink" href="B.html#B::OP-Methods">#</a><a id="B16"></a>B::OP Methods</h2>

<p>These methods get the values of similarly named fields within the OP data structure. See top of <code>op.h</code> for more info.</p>

<dl>

<dt id="next"><a class="permalink" href="B.html#next">#</a>next</dt>
<dd>

</dd>
<dt id="sibling"><a class="permalink" href="B.html#sibling">#</a>sibling</dt>
<dd>

</dd>
<dt id="parent"><a class="permalink" href="B.html#parent">#</a>parent</dt>
<dd>

<p>Returns the OP&#39;s parent. If it has no parent, or if your perl wasn&#39;t built with <code>-DPERL_OP_PARENT</code>, returns NULL.</p>

<p>Note that the global variable <code>$B::OP::does_parent</code> is undefined on older perls that don&#39;t support the <code>parent</code> method, is defined but false on perls that support the method but were built without <code>-DPERL_OP_PARENT</code>, and is true otherwise.</p>

</dd>
<dt id="name"><a class="permalink" href="B.html#name">#</a>name</dt>
<dd>

<p>This returns the op name as a string (e.g. &quot;add&quot;, &quot;rv2av&quot;).</p>

</dd>
<dt id="ppaddr"><a class="permalink" href="B.html#ppaddr">#</a>ppaddr</dt>
<dd>

<p>This returns the function name as a string (e.g. &quot;PL_ppaddr[OP_ADD]&quot;, &quot;PL_ppaddr[OP_RV2AV]&quot;).</p>

</dd>
<dt id="desc"><a class="permalink" href="B.html#desc">#</a>desc</dt>
<dd>

<p>This returns the op description from the global C PL_op_desc array (e.g. &quot;addition&quot; &quot;array deref&quot;).</p>

</dd>
<dt id="targ"><a class="permalink" href="B.html#targ">#</a>targ</dt>
<dd>

</dd>
<dt id="type"><a class="permalink" href="B.html#type">#</a>type</dt>
<dd>

</dd>
<dt id="opt"><a class="permalink" href="B.html#opt">#</a>opt</dt>
<dd>

</dd>
<dt id="flags"><a class="permalink" href="B.html#flags">#</a>flags</dt>
<dd>

</dd>
<dt id="private"><a class="permalink" href="B.html#private">#</a>private</dt>
<dd>

</dd>
<dt id="spare"><a class="permalink" href="B.html#spare">#</a>spare</dt>
<dd>

</dd>
</dl>

<h2 id="B::UNOP-Method"><a class="permalink" href="B.html#B::UNOP-Method">#</a><a id="B17"></a>B::UNOP Method</h2>

<dl>

<dt id="first"><a class="permalink" href="B.html#first">#</a>first</dt>
<dd>

</dd>
</dl>

<h2 id="B::UNOP_AUX-Methods-(since-5.22)"><a class="permalink" href="B.html#B::UNOP_AUX-Methods-(since-5.22)">#</a><a id="B18"></a><a id="B::UNOP_AUX-Methods-since-5.22"></a>B::UNOP_AUX Methods (since 5.22)</h2>

<dl>

<dt id="aux_list(cv)"><a class="permalink" href="B.html#aux_list(cv)">#</a><a id="aux_list"></a><a id="aux_list-cv"></a>aux_list(cv)</dt>
<dd>

<p>This returns a list of the elements of the op&#39;s aux data structure, or a null list if there is no aux. What will be returned depends on the object&#39;s type, but will typically be a collection of <code>B::IV</code>, <code>B::GV</code>, etc. objects. <code>cv</code> is the <code>B::CV</code> object representing the sub that the op is contained within.</p>

</dd>
<dt id="string(cv)"><a class="permalink" href="B.html#string(cv)">#</a><a id="string"></a><a id="string-cv"></a>string(cv)</dt>
<dd>

<p>This returns a textual representation of the object (likely to b useful for deparsing and debugging), or an empty string if the op type doesn&#39;t support this. <code>cv</code> is the <code>B::CV</code> object representing the sub that the op is contained within.</p>

</dd>
</dl>

<h2 id="B::BINOP-Method"><a class="permalink" href="B.html#B::BINOP-Method">#</a><a id="B19"></a>B::BINOP Method</h2>

<dl>

<dt id="last"><a class="permalink" href="B.html#last">#</a>last</dt>
<dd>

</dd>
</dl>

<h2 id="B::LOGOP-Method"><a class="permalink" href="B.html#B::LOGOP-Method">#</a><a id="B20"></a>B::LOGOP Method</h2>

<dl>

<dt id="other"><a class="permalink" href="B.html#other">#</a>other</dt>
<dd>

</dd>
</dl>

<h2 id="B::LISTOP-Method"><a class="permalink" href="B.html#B::LISTOP-Method">#</a><a id="B21"></a>B::LISTOP Method</h2>

<dl>

<dt id="children"><a class="permalink" href="B.html#children">#</a>children</dt>
<dd>

</dd>
</dl>

<h2 id="B::PMOP-Methods"><a class="permalink" href="B.html#B::PMOP-Methods">#</a><a id="B22"></a>B::PMOP Methods</h2>

<dl>

<dt id="pmreplroot"><a class="permalink" href="B.html#pmreplroot">#</a>pmreplroot</dt>
<dd>

</dd>
<dt id="pmreplstart"><a class="permalink" href="B.html#pmreplstart">#</a>pmreplstart</dt>
<dd>

</dd>
<dt id="pmflags"><a class="permalink" href="B.html#pmflags">#</a>pmflags</dt>
<dd>

</dd>
<dt id="precomp2"><a class="permalink" href="B.html#precomp2">#</a>precomp</dt>
<dd>

</dd>
<dt id="pmoffset"><a class="permalink" href="B.html#pmoffset">#</a>pmoffset</dt>
<dd>

<p>Only when perl was compiled with ithreads.</p>

</dd>
<dt id="code_list"><a class="permalink" href="B.html#code_list">#</a>code_list</dt>
<dd>

<p>Since perl 5.17.1</p>

</dd>
<dt id="pmregexp"><a class="permalink" href="B.html#pmregexp">#</a>pmregexp</dt>
<dd>

<p>Added in perl 5.22, this method returns the B::REGEXP associated with the op. While PMOPs do not actually have <code>pmregexp</code> fields under threaded builds, this method returns the regexp under threads nonetheless, for convenience.</p>

</dd>
</dl>

<h2 id="B::SVOP-Methods"><a class="permalink" href="B.html#B::SVOP-Methods">#</a><a id="B23"></a>B::SVOP Methods</h2>

<dl>

<dt id="sv"><a class="permalink" href="B.html#sv">#</a>sv</dt>
<dd>

</dd>
<dt id="gv"><a class="permalink" href="B.html#gv">#</a>gv</dt>
<dd>

</dd>
</dl>

<h2 id="B::PADOP-Method"><a class="permalink" href="B.html#B::PADOP-Method">#</a><a id="B24"></a>B::PADOP Method</h2>

<dl>

<dt id="padix"><a class="permalink" href="B.html#padix">#</a>padix</dt>
<dd>

</dd>
</dl>

<h2 id="B::PVOP-Method"><a class="permalink" href="B.html#B::PVOP-Method">#</a><a id="B25"></a>B::PVOP Method</h2>

<dl>

<dt id="pv"><a class="permalink" href="B.html#pv">#</a>pv</dt>
<dd>

</dd>
</dl>

<h2 id="B::LOOP-Methods"><a class="permalink" href="B.html#B::LOOP-Methods">#</a><a id="B26"></a>B::LOOP Methods</h2>

<dl>

<dt id="redoop"><a class="permalink" href="B.html#redoop">#</a>redoop</dt>
<dd>

</dd>
<dt id="nextop"><a class="permalink" href="B.html#nextop">#</a>nextop</dt>
<dd>

</dd>
<dt id="lastop"><a class="permalink" href="B.html#lastop">#</a>lastop</dt>
<dd>

</dd>
</dl>

<h2 id="B::COP-Methods"><a class="permalink" href="B.html#B::COP-Methods">#</a><a id="B27"></a>B::COP Methods</h2>

<p>The <code>B::COP</code> class is used for &quot;nextstate&quot; and &quot;dbstate&quot; ops. As of Perl 5.22, it is also used for &quot;null&quot; ops that started out as COPs.</p>

<dl>

<dt id="label"><a class="permalink" href="B.html#label">#</a>label</dt>
<dd>

</dd>
<dt id="stash"><a class="permalink" href="B.html#stash">#</a>stash</dt>
<dd>

</dd>
<dt id="stashpv"><a class="permalink" href="B.html#stashpv">#</a>stashpv</dt>
<dd>

</dd>
<dt id="stashoff-(threaded-only)"><a class="permalink" href="B.html#stashoff-(threaded-only)">#</a><a id="stashoff"></a><a id="stashoff-threaded-only"></a>stashoff (threaded only)</dt>
<dd>

</dd>
<dt id="file"><a class="permalink" href="B.html#file">#</a>file</dt>
<dd>

</dd>
<dt id="cop_seq"><a class="permalink" href="B.html#cop_seq">#</a>cop_seq</dt>
<dd>

</dd>
<dt id="line"><a class="permalink" href="B.html#line">#</a>line</dt>
<dd>

</dd>
<dt id="warnings"><a class="permalink" href="B.html#warnings">#</a>warnings</dt>
<dd>

</dd>
<dt id="io"><a class="permalink" href="B.html#io">#</a>io</dt>
<dd>

</dd>
<dt id="hints"><a class="permalink" href="B.html#hints">#</a>hints</dt>
<dd>

</dd>
<dt id="hints_hash"><a class="permalink" href="B.html#hints_hash">#</a>hints_hash</dt>
<dd>

</dd>
</dl>

<h2 id="B::METHOP-Methods-(Since-Perl-5.22)"><a class="permalink" href="B.html#B::METHOP-Methods-(Since-Perl-5.22)">#</a><a id="B28"></a><a id="B::METHOP-Methods-Since-Perl-5.22"></a>B::METHOP Methods (Since Perl 5.22)</h2>

<dl>

<dt id="first1"><a class="permalink" href="B.html#first1">#</a>first</dt>
<dd>

</dd>
<dt id="meth_sv"><a class="permalink" href="B.html#meth_sv">#</a>meth_sv</dt>
<dd>

</dd>
</dl>

<h2 id="PAD-RELATED-CLASSES"><a class="permalink" href="B.html#PAD-RELATED-CLASSES">#</a><a id="PAD"></a>PAD-RELATED CLASSES</h2>

<p>Perl 5.18 introduced a new class, B::PADLIST, returned by B::CV&#39;s <code>PADLIST</code> method.</p>

<p>Perl 5.22 introduced the B::PADNAMELIST and B::PADNAME classes.</p>

<h2 id="B::PADLIST-Methods"><a class="permalink" href="B.html#B::PADLIST-Methods">#</a><a id="B29"></a>B::PADLIST Methods</h2>

<dl>

<dt id="MAX2"><a class="permalink" href="B.html#MAX2">#</a>MAX</dt>
<dd>

</dd>
<dt id="ARRAY2"><a class="permalink" href="B.html#ARRAY2">#</a>ARRAY</dt>
<dd>

<p>A list of pads. The first one is a B::PADNAMELIST containing the names. The rest are currently B::AV objects, but that could change in future versions.</p>

</dd>
<dt id="ARRAYelt1"><a class="permalink" href="B.html#ARRAYelt1">#</a>ARRAYelt</dt>
<dd>

<p>Like <code>ARRAY</code>, but takes an index as an argument to get only one element, rather than a list of all of them.</p>

</dd>
<dt id="NAMES"><a class="permalink" href="B.html#NAMES">#</a>NAMES</dt>
<dd>

<p>This method, introduced in 5.22, returns the B::PADNAMELIST. It is equivalent to <code>ARRAYelt</code> with a 0 argument.</p>

</dd>
<dt id="REFCNT1"><a class="permalink" href="B.html#REFCNT1">#</a>REFCNT</dt>
<dd>

</dd>
<dt id="id"><a class="permalink" href="B.html#id">#</a>id</dt>
<dd>

<p>This method, introduced in 5.22, returns an ID shared by clones of the same padlist.</p>

</dd>
<dt id="outid"><a class="permalink" href="B.html#outid">#</a>outid</dt>
<dd>

<p>This method, also added in 5.22, returns the ID of the outer padlist.</p>

</dd>
</dl>

<h2 id="B::PADNAMELIST-Methods"><a class="permalink" href="B.html#B::PADNAMELIST-Methods">#</a><a id="B30"></a>B::PADNAMELIST Methods</h2>

<dl>

<dt id="MAX3"><a class="permalink" href="B.html#MAX3">#</a>MAX</dt>
<dd>

</dd>
<dt id="ARRAY3"><a class="permalink" href="B.html#ARRAY3">#</a>ARRAY</dt>
<dd>

</dd>
<dt id="ARRAYelt2"><a class="permalink" href="B.html#ARRAYelt2">#</a>ARRAYelt</dt>
<dd>

<p>These two methods return the pad names, using B::SPECIAL objects for null pointers and B::PADNAME objects otherwise.</p>

</dd>
<dt id="REFCNT2"><a class="permalink" href="B.html#REFCNT2">#</a>REFCNT</dt>
<dd>

</dd>
</dl>

<h2 id="B::PADNAME-Methods"><a class="permalink" href="B.html#B::PADNAME-Methods">#</a><a id="B31"></a>B::PADNAME Methods</h2>

<dl>

<dt id="PV1"><a class="permalink" href="B.html#PV1">#</a>PV</dt>
<dd>

</dd>
<dt id="PVX1"><a class="permalink" href="B.html#PVX1">#</a>PVX</dt>
<dd>

</dd>
<dt id="LEN1"><a class="permalink" href="B.html#LEN1">#</a>LEN</dt>
<dd>

</dd>
<dt id="REFCNT3"><a class="permalink" href="B.html#REFCNT3">#</a>REFCNT</dt>
<dd>

</dd>
<dt id="FLAGS3"><a class="permalink" href="B.html#FLAGS3">#</a>FLAGS</dt>
<dd>

<p>For backward-compatibility, if the PADNAMEt_OUTER flag is set, the FLAGS method adds the SVf_FAKE flag, too.</p>

</dd>
<dt id="TYPE2"><a class="permalink" href="B.html#TYPE2">#</a>TYPE</dt>
<dd>

<p>A B::HV object representing the stash for a typed lexical.</p>

</dd>
<dt id="SvSTASH1"><a class="permalink" href="B.html#SvSTASH1">#</a>SvSTASH</dt>
<dd>

<p>A backward-compatibility alias for TYPE.</p>

</dd>
<dt id="OURSTASH"><a class="permalink" href="B.html#OURSTASH">#</a>OURSTASH</dt>
<dd>

<p>A B::HV object representing the stash for &#39;our&#39; variables.</p>

</dd>
<dt id="PROTOCV"><a class="permalink" href="B.html#PROTOCV">#</a>PROTOCV</dt>
<dd>

<p>The prototype CV for a &#39;my&#39; sub.</p>

</dd>
<dt id="COP_SEQ_RANGE_LOW1"><a class="permalink" href="B.html#COP_SEQ_RANGE_LOW1">#</a>COP_SEQ_RANGE_LOW</dt>
<dd>

</dd>
<dt id="COP_SEQ_RANGE_HIGH1"><a class="permalink" href="B.html#COP_SEQ_RANGE_HIGH1">#</a>COP_SEQ_RANGE_HIGH</dt>
<dd>

<p>Sequence numbers representing the scope within which a lexical is visible. Meaningless if PADNAMEt_OUTER is set.</p>

</dd>
<dt id="PARENT_PAD_INDEX"><a class="permalink" href="B.html#PARENT_PAD_INDEX">#</a>PARENT_PAD_INDEX</dt>
<dd>

<p>Only meaningful if PADNAMEt_OUTER is set.</p>

</dd>
<dt id="PARENT_FAKELEX_FLAGS"><a class="permalink" href="B.html#PARENT_FAKELEX_FLAGS">#</a>PARENT_FAKELEX_FLAGS</dt>
<dd>

<p>Only meaningful if PADNAMEt_OUTER is set.</p>

</dd>
</dl>

<h2 id="$B::overlay"><a class="permalink" href="B.html#$B::overlay">#</a><a id="B::overlay"></a>$B::overlay</h2>

<p>Although the optree is read-only, there is an overlay facility that allows you to override what values the various B::*OP methods return for a particular op. <code>$B::overlay</code> should be set to reference a two-deep hash: indexed by OP address, then method name. Whenever a an op method is called, the value in the hash is returned if it exists. This facility is used by B::Deparse to &quot;undo&quot; some optimisations. For example:</p>

<pre><code>local $B::overlay = {};
...
if ($op-&gt;name eq &quot;foo&quot;) {
    $B::overlay-&gt;{$$op} = {
            name =&gt; &#39;bar&#39;,
            next =&gt; $op-&gt;next-&gt;next,
    };
}
...
$op-&gt;name # returns &quot;bar&quot;
$op-&gt;next # returns the next op but one</code></pre>

<h1 id="AUTHOR"><a class="permalink" href="B.html#AUTHOR">#</a>AUTHOR</h1>

<p>Malcolm Beattie, <code>mbeattie@sable.ox.ac.uk</code></p>


      </div>
      <div id="footer">
        <p>Perldoc Browser is maintained by Dan Book (<a href="https://metacpan.org/author/DBOOK">DBOOK</a>). Please contact him via the <a href="https://github.com/Grinnz/perldoc-browser/issues">GitHub issue tracker</a> or <a href="mailto:dbook@cpan.org">email</a> regarding any issues with the site itself, search, or rendering of documentation.</p>

<p>The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the <a href="https://github.com/Perl/perl5/issues">Perl issue tracker</a>, the <a href="https://lists.perl.org/list/perl5-porters.html">mailing list</a>, or <a href="https://kiwiirc.com/client/irc.perl.org/p5p">IRC</a> to report any issues with the contents or format of the documentation.</p>


      </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
    <script src="../highlight.pack.js"></script>
    <script>hljs.highlightAll();</script>
  </body>
</html>
